﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DataModel
{
   public class CurDayTaskPlan
    {
        public int planDetailId { get; set; }
        public int workPlanId { get; set; }
        public int workTeamId { get; set; }
        public int personId { get; set; }
        public int deviceId { get; set; }
        public int carId { get; set; }
        public string workPlanType { get; set; }
        public string deviceNo { get; set; }
        public int fenceId { get; set; }
        public int deptId { get; set; }
        public string fenceType { get; set; }
        public string latlng { get; set; }
        public string checkPoints { get; set; }
        public int radius { get; set; }
        public TimeSpan startSpan { get; set; }
        public TimeSpan endSpan { get; set; }
        public int checkWorkId { get; set; }
        public int workState { get; set; }
        public string hashKey { get; set; }
        public string key { get; set; }
        public CurDayTaskPlan()
        {

        }
    



    }

    public class OFFSET_ONE
    {
        public double offsetlon { get; set; }
        public double offsetlat { get; set; }
    }
    public class POI_ALL
    {
        public string name { get; set; }
        public string region_name { get; set; }
        public double x { get; set; }
        public double y { get; set; }
        public double x1 { get; set; }
    }

    public class POI_ALL_INDEX
    {
        public double x1 { get; set; }
    }

    public class POI_ROAD_ALL
    {
        public string name { get; set; }
        public double x { get; set; }
        public double y { get; set; }
        public double x1 { get; set; }
    }

    public class POI_ROAD_ALL_INDEX
    {
        public double x1 { get; set; }
    }

    public class ImageData
    {
        /// <summary>
        /// 照片编号
        /// </summary>
        public string PhotoNum { get; set; }

        /// <summary>
        /// 手机号
        /// </summary>
        public string phoneNumber { get; set; }

        /// <summary>
        /// 设备编号
        /// </summary>
        public string TerminalNumber { get; set; }

        public Hashtable PackList = new Hashtable();

        /// <summary>
        /// 总包数
        /// </summary>
        public int AllPackageNum { get; set; }
        /// <summary>
        /// 流水号
        /// </summary>
        public int seqId { get; set; }
        /// <summary>
        /// 手机号 + "-" + 流水号-当前包序号
        /// </summary>
        public string key { get; set; }

        public bool SaveImageData(int CurBackNo, string Data)
        {
            if (PackList.ContainsKey(CurBackNo))
            {
                PackList[CurBackNo] = Data;
            }
            else
            {
                PackList.Add(CurBackNo, Data);
                imageLen += Data.Length / 2;
            }


            for (int i = 1; i <= AllPackageNum; i++)
            {
                if (!PackList.ContainsKey(i))
                    return false;
            }
            return true;
        }

        private DateTime activeTime;

        public DateTime ActiveTime
        {
            get { return activeTime; }
            set { activeTime = value; }
        }
        /// <summary>
        /// 存储照片表的sql语句
        /// </summary>
        public string SaveSql { get; set; }

        /// <summary>
        /// 存储文件路径
        /// </summary>
        public string FilePath { get; set; }

        public long imageLen { get; set; }
    }
}
